<template>
  <el-dialog
    v-bind="$attrs"
    center
    :visible="value !== null"
  >
    <slot name="content">
      content
    </slot>
    <div slot="footer" class="dialog-footer">
      <el-button type="primary" @click="handleSave">确 定</el-button>

      <el-button @click="value = null">取 消</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  name: 'CreateDialog',
  components: {},
  props: {
    value: {
      type: String,
      default: null
    }
  },
  data() {
    return {
    }
  },
  methods: {
    handleSave() {
      this.$emit('input', null)
      console.log('保存')
    }
  }
}
</script>

<style scoped lang="scss">

</style>
